package com.yuexunxinxi.carefree.entity;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.yuexunxinxi.carefree.utils.BaseEntity;
import com.yuexunxinxi.carefree.utils.AarrayJsonSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 作者: 李咨辰
 * 文件名: BTweet.java
 * 路径: com.yuexunxinxi.carefree.entity
 * 时间: 2024-10-21 13:16
 * 版本: 1.0
 * 描述: TODO
 **/
@JsonInclude(JsonInclude.Include.NON_NULL)
@EqualsAndHashCode(callSuper = true)
@Data
public class BTweet extends BaseEntity {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;//编号
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;//用户编号
    private String content;//文章内容
    @JsonSerialize(using = AarrayJsonSerializer.class)
    private String picture;//图片/视频
    private String address;//发布地址(省/市/县)推荐展示
    private String detailsAddress;//发布地址(村/街道/社区)同城展示
    private int type;//状态(0.公开可见 1.粉丝可见 2.自己可见)

    @Override
    public String toString() {
        return "BTweet{" +
                "id=" + id +
                ", userId=" + userId +
                ", content='" + content + '\'' +
                ", picture='" + picture + '\'' +
                ", address='" + address + '\'' +
                ", detailsAddress='" + detailsAddress + '\'' +
                ", type=" + type +
                '}';
    }
}
